<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:62:"/var/www/fish/application/crm/view/serviceorder/orderList.html";i:1516864578;}*/ ?>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>小鱼ADMIN</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="/public/static/css/font.css">
    <link rel="stylesheet" href="/public/static/css/bgadmin.css">
    <script type="text/javascript" src="/public/static/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/public/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/public/static/js/bgadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	<script type="text/javascript" >
	$(function(){
		if("<?php echo $customer_code; ?>"!="0"){
			$("#search_id").css("display","none");
			$("#bg_nav_id").css("display","none");
		}
	})
	</script>
  </head>
  <style>
  .layui-input{height:30px;}
  .layui-form-label{line-height: 16px;}
  </style>
  <body>
    <div class="bg-body">
        <div class="layui-row" id="bg_nav_id">
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
        </div>
      <div class="layui-row" id="search_id">
        <form class="layui-form ">
			<div class="layui-form-item high-ranking" style="display:none;margin-bottom:0px;">
				<div class="layui-inline">
				  <label class="layui-form-label">订单状态：</label>
				  <div class="layui-input-inline">
					<select name="order_status" id="id_order_status" lay-verify="" autocomplete="off" class="layui-input">
						<option value=""></option>  <!--请选择-->
						<option value="1">已确认</option>  <!--已确认-->
						<option value="3">待审核</option>  <!--待审核-->
						<option value="7">未通过</option>
						<option value="8">问题单</option>
						<option value="2"> 取消</option>  <!--取消-->
						<option value="4">退货</option>  <!--退货-->
					</select>
				  </div>
				</div>
				<div class="layui-inline">
				  <label class="layui-form-label">付款状态：</label>
				  <div class="layui-input-inline">
					<select name="pay_status" id="id_pay_status" lay-verify="" autocomplete="off" class="layui-input">
						<option value=""></option>  <!--请选择-->
						<option value="N">未付款</option>  <!--未付款-->
						<option value="M">付款中</option>  <!--付款中-->
						<option value="Y">已付款</option>  <!--已付款-->
					</select>
				  </div>
				</div>
				<div class="layui-inline">
				  <label class="layui-form-label">发货状态：</label>
				  <div class="layui-input-inline">
					<select name="shipping_status" id="id_shipping_status" lay-verify="" autocomplete="off" class="layui-input">
						<option value=""></option>  <!--请选择-->
						<option value="0">未发货</option>  <!--未发货-->
						<option value="3">配货中</option>  <!--配货中-->
						<option value="1">已发货</option>  <!--已发货-->
						<option value="2">收货确认<!--收货确认--></option>  
						<option value="4">已发货(部分商品)</option>  <!--已发货(部分商品)-->
						<option value="5">发货中</option>  <!--发货中-->
					</select>
				  </div>
				</div>
				<div class="layui-inline">
				  <label class="layui-form-label">物流状态：</label>
				  <div class="layui-input-inline">
					<select name="logistics_state" id="id_logistics_state" lay-verify="" autocomplete="off" class="layui-input">
						<option value=""></option>  <!--请选择-->
						<option value="0">在途</option>
						<option value="1">揽件</option>
						<option value="2">疑难</option>
						<option value="3">签收</option>
						<option value="4">退签</option>
						<option value="5">派件</option>
						<option value="6">退回</option>
						<option value="7">转投</option>
						<option value="all">所有状态</option>
					</select>
				  </div>
				</div>
				<div class="layui-inline">
				  <label class="layui-form-label">配送方式：</label>
				  <div class="layui-input-inline">
					<select name="shopping_name" id="id_shopping_name" lay-verify="" autocomplete="off" class="layui-input">
						<option value=""></option>  <!--请选择-->
						<option value=""></option>
							<?php if(is_array($Logistics) || $Logistics instanceof \think\Collection || $Logistics instanceof \think\Paginator): $i = 0; $__LIST__ = $Logistics;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
							<option value="<?php echo $vo['id']; ?>"><?php echo $vo['name']; ?></option>
							<?php endforeach; endif; else: echo "" ;endif; ?>
						</select>
					</select>
				  </div>
				</div>
				<div class="layui-inline" >
				  <label class="layui-form-label">订单号：</label>
				  <div class="layui-input-inline">
					<input type="text" name="order_num" id= "id_order_num" lay-verify="" autocomplete="off" class="layui-input">
				  </div>
				</div>
				<div class="layui-inline" >
				  <label class="layui-form-label">物流号：</label>
				  <div class="layui-input-inline">
					<input type="text" name="logistics_account" id= "id_logistics_account" lay-verify="" autocomplete="off" class="layui-input">
				  </div>
				</div>
				<div class="layui-inline" >
				  <label class="layui-form-label">数据标识：</label>
				  <div class="layui-input-inline">
					<input type="text" name="import_mark" id= "import_mark_id" lay-verify="" autocomplete="off" class="layui-input">
				  </div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
				  <label class="layui-form-label">下单时间从：</label>
				  <div class="layui-input-inline">
					<input type="text" class="layui-input" id="start_createtime_id" name="start_createtime">
				  </div>
				</div>
				<div class="layui-inline">
				  <label class="layui-form-label">到：</label>
				  <div class="layui-input-inline">
					<input type="text" class="layui-input" id="end_createtime_id" name="end_createtime">
				  </div>
				</div>
				<div class="layui-inline">
				  <label class="layui-form-label">收货姓名：</label>
				  <div class="layui-input-inline">
					<input type="text" name="name" lay-verify="" id="name_id" autocomplete="off" class="layui-input">
				  </div>
				</div>
				<div class="layui-inline">
				  <label class="layui-form-label">收货人号码：</label>
				  <div class="layui-input-inline">
					<input type="text" name="phone" id= "phone_id" lay-verify="" autocomplete="off" class="layui-input">
				  </div>
				</div>
				<!--<div class="layui-inline">
				  <label class="layui-form-label">下单工号：</label>
				  <div class="layui-input-inline">
					<select name="create_user" id="create_user_id" lay-verify="" autocomplete="off" class="layui-input" lay-search="">
						<option value="">直接选择或搜索选择</option>
						<?php if(is_array($arrUsers) || $arrUsers instanceof \think\Collection || $arrUsers instanceof \think\Paginator): $i = 0; $__LIST__ = $arrUsers;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
						<option value="<?php echo $vo['username']; ?>"><?php echo $vo['cn_name']; ?>   ( <?php echo $vo['username']; ?> ) </option>
						<?php endforeach; endif; else: echo "" ;endif; ?>
					</select>
				  </div>
				</div>
				<div class="layui-inline">
				  <label class="layui-form-label">所属部门：</label>
				  <div class="layui-input-inline">
					<select name="dept_id" id="dept_id" lay-verify="" autocomplete="off" class="layui-input">
						<option value="">请选择</option>
						<option value="0">顶级部门</option>
						<?php echo $options; ?>
					</select>
				  </div>
				</div>-->
				<a class="layui-btn layui-btn-small"  style="margin-bottom: 10px;" id="search"  lay-submit="" lay-filter="search"><i class="layui-icon" >&#xe615;</i></a>
				<a class="layui-btn layui-btn-primary layui-btn-mini" id="height_search" onclick="heightSearch();" style="margin-bottom: 10px;">高级搜索</a>
			</div>
		</form>
	  </div>

      <table class="layui-table" lay-data="{id: 'id', height: 'full-200',url:'/index.php/crm/Serviceorder/orderDataList?customer_code=<?php echo $customer_code; ?>', page:true, limit:10, limits:[10,20,30,50]}" lay-filter="demo">
        <thead>
        <tr>
          <th lay-data="{checkbox:true, fixed: true}"></th>
          <th lay-data="{field:'order_num', align:'center', width:180, fixed: 'left'}">订单号</th>
          <th lay-data="{field:'consignee', width:80, align:'center', fixed: 'left'}">收货人</th>
		  <?php if(($username == 'admin') OR ($priv['display_phone'] == 'Y')): ?>
          <th lay-data="{field:'phone', width:120, align:'center', fixed: 'left'}">收货人号码</th>
		  <?php endif; ?>
          <th lay-data="{field:'createname', width:80, align:'center'}">下单坐席</th>
          <th lay-data="{field:'cn_name', width:80, align:'center'}">坐席姓名</th>
          <th lay-data="{field:'cope_money', width:80, align:'center'}">应付金额</th>
          <th lay-data="{field:'logistics_account', width:160, align:'center'}">物流号</th>
          <th lay-data="{field:'shopping_name', width:100, align:'center'}">配送方式</th>
          <th lay-data="{field:'logistics_Info', width:100, align:'center'}">物流信息</th>
          <th lay-data="{field:'members_bomb', width:80, align:'center'}">审单坐席</th>
          <th lay-data="{field:'order_status', width:160, align:'center'}">订单状态</th>
          <th lay-data="{field:'logistics_state', width:80, align:'center'}">物流状态</th>
          <th lay-data="{field:'createtime', width:120, align:'center'}">下单时间</th>
          <th lay-data="{field:'saleProgram', width:120, align:'center'}">销售方案</th>
		  <th lay-data="{field:'delivery_address', width:150, align:'center'}">地址</th>
          <th lay-data="{field:'dept_id', width:100, align:'center'}">所属部门</th>
          <th lay-data="{field:'payment', width:100, align:'center'}">支付方式</th>
          <th lay-data="{fixed: 'right', width:120, align:'center', toolbar: '#barDemo'}">操作</th>
        </tr>
        </thead>
      </table>
       
      <script type="text/html" id="barDemo">
        <?php if(($username == 'admin') OR ($priv['edit'] == 'Y')): ?>
		<a class="layui-btn layui-btn-normal layui-btn-mini" lay-event="edit">编辑</a>
		<?php endif; if(($username == 'admin') OR ($priv['delete'] == 'Y')): ?>
        <a class="layui-btn layui-btn-danger layui-btn-mini" lay-event="del">删除</a>
		<?php endif; ?>
	  </script>
    </div>

</body>
<div class="bg-body" id="id_setting" style="display:none;">
	<form class="layui-form" action="#" method="post" id="mainForm">
	  <div class="layui-form-item">
		<div class="layui-inline">
		  <label class="layui-form-label">发货状态：</label>
		  <div class="layui-input-inline">
			<select name="shipping_status2" id="id_shipping_status2" lay-verify="" autocomplete="off" class="layui-input">
				<option value=""></option>  <!--请选择-->
				<option value="0">未发货</option>  <!--未发货-->
				<option value="3">配货中</option>  <!--配货中-->
				<option value="1">已发货</option>  <!--已发货-->
				<option value="2">收货确认<!--收货确认--></option>  
				<option value="4">已发货(部分商品)</option>  <!--已发货(部分商品)-->
				<option value="5">发货中</option>  <!--发货中-->
			</select>
		  </div>
		</div>
		<div class="layui-inline">
		  <label class="layui-form-label">配送方式：</label>
		  <div class="layui-input-inline">
			<select name="shopping_name2" id="id_shopping_name2" lay-verify="" autocomplete="off" class="layui-input">
				<option value=""></option>  <!--请选择-->
				<option value=""></option>
					<?php if(is_array($Logistics) || $Logistics instanceof \think\Collection || $Logistics instanceof \think\Paginator): $i = 0; $__LIST__ = $Logistics;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
					<option value="<?php echo $vo['id']; ?>"><?php echo $vo['name']; ?></option>
					<?php endforeach; endif; else: echo "" ;endif; ?>
				</select>
			</select>
		  </div>
		</div>
		
		<div class="layui-inline" >
		  <label class="layui-form-label">物流号：</label>
		  <div class="layui-input-inline">
			<input type="text" name="logistics_account2" id= "id_logistics_account2" lay-verify="" autocomplete="off" class="layui-input">
		  </div>
		</div>
	  </div>
	  <input type="hidden" id="order_id"  />
	  <div class="layui-form-item">
		  <label for="L_repass" class="layui-form-label">
		  </label>
		  <a  class="layui-btn" onclick="updateLogistics();">
			  保存
		  </a>
	  </div>
  </form>
</div>
<script type="text/javascript" src="/public/static/crm/js/serviceOrder/orderList.js"></script>
</html>